import * as Pinia from 'pinia'
import { createPersistedState } from 'pinia-plugin-persistedstate'

const pinia = Pinia.createPinia()
pinia.use(createPersistedState({
	storage:{
		getItem:(key) => uni.getStorageSync(key),
		setItem: (key, value) => uni.setStorageSync(key, value),
	}
}))
export default pinia

// 全局导出
export * from './modules/user.js'
export * from './modules/channel.js'
export * from './modules/city.js'
export * from './modules/system.js'
export * from './modules/config.js'
export * from './modules/account.js'
export * from './modules/form.js'